POV-Ray : Newsgroups : povray.general : Newbie: Candy Cane stripes on a cone? : Re: Newbie: Candy Cane stripes on a cone? Server Time
13 Aug 2024 07:26:17 EDT (-0400)
  Re: Newbie: Candy Cane stripes on a cone?  
From: Dan Connelly
Date: 13 Oct 1998 22:58:55
Message: <36240543.D98C59D4@flash.net>
From textures.inc :

// Red & white stripes - Looks best on a y axis Cylinder
// It "spirals" because it's gradient on two axis
#declare Candy_Cane = 
pigment {
    gradient x+y
    color_map {
        [0.25 rgb <1,0,0>]
        [0.25 rgb <1,1,1>]
        [0.75 rgb <1,1,1>]
        [0.75 rgb <1,0,0>]
    }
}

---------------------------

Note this is not a spiral, but simply rotated independent
stripes. 

A functional linear combination of gradient y and radial 
with an appropriate pigment map would do the
trick, but I am not sure if the syntax exists to do this.

Of course, one could always use an image_map with cylindrical
mapping.

Dan

Ken wrote:
> 
> For  a clue how to do it look at the textures in textures.inc.
> Down at the bottom of the list of textures are some examples
> or spiraling stripes called coincidedntly Cane.
> 
> Ken
> 
> James Fitzgerald wrote:
> 
> > How would I do candy cane stripes on a cone?
> > I've looked through the docs, can't seem to find what I'm looking for.
> > Any ideas on how I could do this?
> > Ideally I would want the z distance of the stripe height to stay the
> > same
> > (so the stripes appear to get bigger down the cone simply because
> > they're
> > taking up more area in the other directions).
> >
> > -JamesF.

-- 
http://www.flash.net/~djconnel/


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.